import React, { Component } from 'react'
import A from './components/A'
import B from './components/B'
import globalContext from "./context";


export default class App extends Component {
    state = {
        userName: 'kashsa',
        age: 15 
    }
    changeUserName(userName){
        this.setState({
            userName
        })
    }

    render() {
        const {Provider} = globalContext;
        return (
            <Provider value={{...this.state}}>
                <A></A>
                <B></B>
            </Provider>
        )
    }
}
